#ifndef TRANSMIT_DATA_H
#define TRANSMIT_DATA_H

#include <QWidget>
#include "util/util.h"
#include <QTcpServer>
#include <QTcpSocket>

namespace Ui {
class TransmitData;
}

class TransmitData : public QWidget
{
    Q_OBJECT

public:
    explicit TransmitData(QWidget *parent = 0);
    void sendStringData(const QString &data);
    void sendFileData(const QString &filePath);
    uint8_t crc8(uint8_t *data, uint16_t length);
    void connectToHost(QTcpSocket& tcpSocket, const QString& hostAddress, int port);
    void disconnectFromHost(QTcpSocket& tcpSocket);
    ~TransmitData();

private:
    Ui::TransmitData *ui;


};

#endif // TRANSMIT_DATA_H
